package com.note.dao.note;

import com.note.pojo.Note;
import com.note.pojo.Notetype;
import com.note.pojo.notePageShow;

import java.sql.SQLException;
import java.util.List;

public interface noteDao {
    public boolean write(String title, String content, int typeId, java.sql.Timestamp pubtime, int userId) throws SQLException;
    public int all() throws SQLException;
    public List<notePageShow> showAllNote(int beginPage, int pageSize) throws SQLException;
    public int deleteNote(int noteId) throws SQLException;
    public Note selectOne(int noteId) throws SQLException;
    public int updateNote(String title, String content, int typeId, int noteId) throws SQLException;
    public List<Notetype> getTypeList() throws SQLException;
    public List<notePageShow> getNoteByType(int typeId) throws SQLException;
    public List<notePageShow> getNoteBytitle(String title) throws SQLException;
    public int deleteTypeById(int id) throws SQLException;
    public int addType(String typeName) throws SQLException;
}
